/** 动画函数
 * @ 标  识: hchhIOT
 * @ 作  者: 阿拉丁矿工 黄传鸿 <hchhyzc@foxmail.com>
 */
/* ================================================================================================ */
// 🍀引入
/* ================================================================================================ */
import * as d3 from "d3"

/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
// 🐸 图元端定义引入
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
// 🐸 引入存储
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
import { useCanvasStore } from "@/store/canvasStore"; // 画布
import { useWorkStore } from "@/store/workStore"; // 工作数据

/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
// 🐸 使用存储
/**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
const canvasStore = useCanvasStore(); // 画布
const workStore = useWorkStore(); // 设备数据

/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 类型
/**———————————————————————————————————————————————————————————————————————————————————————————————— */

/** 坐标类型 */
type CoordinateType = {
  x: number;
  y: number;
};
/** 动画-类型 */
type AnimateType = {
  /** 属性说明 */
  label: string,
  /** 动画键 */
  key: string,
  /** 使能状态 */
  enable: boolean,
  /** 动画类别:1-样式;2-变换;3-属性;4-线性;5-路径; */
  opt_an_classify: number,
  /** 动画模式:1-值动画;2-值转换动画;3-自动画; */
  opt_an_model: number,
  /** 使用数据*/
  use_data: {
    /** 使用数据状态:False-父数据;True-子数据; */
    is_use_parent: boolean,
    /** 使用父数据_选项:0_父数据; 1_图元数据;2_设备数据 */
    opt_use_parent_set: number,
    /** 使用子数据_选项: 1_图元数据;2_设备数据 */
    opt_use_sub_set: number,
    /** 父id */
    id_parent: string,
    /** 图元id */
    id_pel_data: string,
    /** 设备id  */
    id_equip_data: string,
  }
  /** 触发动画领域 */
  trigger: number[] | string[],
  /** 使用值选项:1-起始和结束;2-多值; */
  opt_use_val: number,
  /** 线性比例的领域 */
  line_domain: number[] | string[],
  /** 线性比例的范围 */
  line_range: number[] | string[],
  /** 起始和结束 */
  from_to: number[] | string[],
  /** 多值 */
  mult_val?: string,
  /** 路径值 */
  path_val: CoordinateType[],
  /** 路径id */
  path_id: string,
  /** 动画延时 */
  begin: number,
  /** 动画时长 */
  dur: number,
  /** 重复选项:1-无限循环;2-按次重复;3-按时长重复 */
  opt_repeat: number,
  /** 重复次数 */
  repeat_count: number,
  /** 重复时长 */
  repeat_dur: number,
}

/* ================================================================================================ */
//                                函数
/* ================================================================================================ */
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 动画处理器
/**———————————————————————————————————————————————————————————————————————————————————————————————— */

/**  动画处理器
 * @pid
 * @AnAttr 动画属性
 * @AttrName 属性名称
 * @AttrType 属性类型 CSS XML auto
 * @
 * @返回 [AnVal, AnHtml]
 * @AnVal 动画值;
 * @AnHtml 动画标签;
*/
export const onAnimationHandle = (pid: string, AnAttr: AnimateType, AttrName?: string, AttrType?: string): any => {
 // console.log("动画-动画处理器")
 // console.log(AnAttr)

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 变量转储
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  /** 动画键 */
  let key = AnAttr.key
  /** 动画类别:1-样式;2-变换;3-属性;4-线性;5-路径; */
  let opt_an_classify = AnAttr.opt_an_classify
  /** 动画模式 1-值动画;2-值转换动画;3-自动画 */
  let opt_an_model = AnAttr.opt_an_model
  /** 使用数据状态:False-父数据;True-子数据; */
  let is_use_parent = AnAttr.use_data.is_use_parent
  /** 使用父数据_选项:0_父数据; 1_图元数据;2_设备数据; */
  let opt_use_parent_set = AnAttr.use_data.opt_use_parent_set
  /** 使用子数据_选项: 1_图元数据;2_设备数据; */
  let opt_use_sub_set = AnAttr.use_data.opt_use_sub_set
  /** 父id */
  let id_parent = AnAttr.use_data.id_parent
  /** 图元id */
  let id_pel_data = AnAttr.use_data.id_pel_data;
  /** 设备id  */
  let id_equip_data = AnAttr.use_data.id_equip_data;
  /** 触发动画领域 */
  let trigger = AnAttr.trigger
  /** 使用值选项:1-起始和结束;2-多值; */
  let opt_use_val = AnAttr.opt_use_val
  /** 起始和结束 */
  let from_to = AnAttr.from_to
  /** 多值 */
  let mult_val = AnAttr.mult_val
  /** 路径值 */
  let path_val = AnAttr.path_val
  /** 路径id */
  let path_id = AnAttr.path_id
  /** 动画延时 */
  let begin = AnAttr.begin
  /** 动画时长 */
  let dur = AnAttr.dur
  /** 重复选项:1-无限循环;2-按次重复;3-按时长重复 */
  let opt_repeat = AnAttr.opt_repeat
  /** 重复次数 */
  let repeat_count = AnAttr.repeat_count
  /** 重复时长 */
  let repeat_dur = AnAttr.repeat_dur

  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 声明参数
  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  /** 动画值 */
  let AnVal = null
  /** 动画标签 */
  let AnHtml = ``

  /* ♈★ 动画类别:0-子动画;
                          图元数据
                          设备数据
  */
  if (opt_an_classify === 0/*子动画*/) {
   // console.log("动画类别:0-子动画");

    if (opt_use_parent_set === 1/*图元数据*/) {
      /** 获取值 */
      let getVal = onGetPelDataVal(id_pel_data)//获取_图元数据
      /** 动画值 */
      AnVal = getVal
    }
    if (opt_use_parent_set === 2/*设备数据*/) {
      /** 获取值 */
      let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
      /** 动画值 */
      AnVal = getVal
    }
  }

  /* ♈★ 动画类别:1-样式动画
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
                    轮廓颜色 stroke
                    填充颜色 fill
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  */
  if (opt_an_classify === 1/*样式动画*/) {
   // console.log("动画类别:1-样式动画");

    if (opt_an_model === 1/*值动画*/) {
      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = onGetParentData(pid, id_parent)
          /** 动画值 */
          AnVal = getVal
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = onGetPelDataVal(id_pel_data)//获取图元数据
          /** 动画值 */
          AnVal = getVal
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
          /** 动画值 */
          AnVal = getVal
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据;*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = onGetPelDataVal(id_pel_data)//获取图元数据
          /** 动画值 */
          AnVal = getVal
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
          /** 动画值 */
          AnVal = getVal
        }
      }
    }
    if (opt_an_model === 2/*值转换动画*/) {

      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = Number(onGetParentData(pid, id_parent))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {
            if (opt_use_val === 1/*起始和结束*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0]
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据;*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0]
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0]
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
    }
    if (opt_an_model === 3/*自动画*/) {

      if (opt_use_val === 1/*起始和结束*/) {

        if (opt_repeat === 0/*重复选项:0-无*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
        }
        if (opt_repeat === 1/*重复选项:1-无限循环*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
        }
        if (opt_repeat === 2/*重复选项:2-按次重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
        }
        if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
        }
      }
      if (opt_use_val === 2/*多值*/) {

        if (opt_repeat === 0/*重复选项:0-无*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val}  fill="freeze"></animate>`
        }
        if (opt_repeat === 1/*重复选项:1-无限循环*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
        }
        if (opt_repeat === 2/*重复选项:2-按次重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
        }
        if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
        }
      }
    }
  }

  /* ♈★ 动画类别:2-变换动画
  ——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  旋转 rotate; 
  水平移动 translateX;
  垂直移动 translateY;  
  缩放 scale;
  水平拉伸 skewX;
  垂直拉伸 skewY;
  ——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  */
  if (opt_an_classify === 2/*变换动画*/) {
   // console.log("动画类别:2-变换动画");

    if (opt_an_model === 1/*值动画*/) {
      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = Number(onGetParentData(pid, id_parent));//获取_父动画数据
          workStore.anGetVal = getVal;//转储-获取值
          /** 动画值 */
          AnVal = getVal

        }
        if (opt_use_parent_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data));//获取图元数据
          workStore.anGetVal = getVal;//转储-获取值
          /** 动画值 */
          AnVal = getVal;
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data));//获取_设备数据
          workStore.anGetVal = getVal;//转储-获取值
          /** 动画值 */
          AnVal = getVal;
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据;*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data));//获取图元数据
          workStore.anGetVal = getVal;//转储-获取值
          /** 动画值 */
          AnVal = getVal

        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data));//获取_设备数据
          workStore.anGetVal = getVal;//转储-获取值
          /** 动画值 */
          AnVal = getVal
        }
      }
    }
    if (opt_an_model === 2/*值转换动画*/) {
      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = Number(onGetParentData(pid, id_parent))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate"  begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)

          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate"  begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate"  begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据;*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate"  begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate"  begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
                }
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                // 旋转 
                if (key === "rotate") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 缩放 
                if (key === "scale") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平移动 
                if (key === "translateX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直移动 
                if (key === "translateY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 水平拉伸 
                if (key === "skewX") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
                // 垂直拉伸 
                if (key === "skewY") {
                  AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
                }
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
    }
    if (opt_an_model === 3/*自动画*/) {

      if (opt_use_val === 1/*起始和结束*/) {

        if (opt_repeat === 0/*重复选项:0-无*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
        }
        if (opt_repeat === 1/*重复选项:1-无限循环*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
        }
        if (opt_repeat === 2/*重复选项:2-按次重复*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s"  repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
        }
        if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" additive="sum" from="${from_to[0]}" to="${from_to[1]} ${from_to[2]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="${from_to[0]} 0" to="${from_to[2]} 0" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" additive="sum" from="0 ${from_to[1]}" to="0 ${from_to[3]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
        }
      }
      if (opt_use_val === 2/*多值*/) {

        if (opt_repeat === 0/*重复选项:0-无*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" additive="sum" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
        }
        if (opt_repeat === 1/*重复选项:1-无限循环*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate"  begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animateTransform>`
          }
        }
        if (opt_repeat === 2/*重复选项:2-按次重复*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" additive="sum" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animateTransform>`
          }
        }
        if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
          // 旋转 
          if (key === "rotate") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="rotate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 缩放 
          if (key === "scale") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="scale" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 水平移动 
          if (key === "translateX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 垂直移动 
          if (key === "translateY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="translate" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 水平拉伸 
          if (key === "skewX") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewX" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
          // 垂直拉伸 
          if (key === "skewY") {
            AnHtml = `<animateTransform attributeName="transform" attributeType="XML" type="skewY" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animateTransform>`
          }
        }
      }
    }
  }

  /* ♈★ 动画类别:3-属性动画
  ——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  轮廓宽度 strokeWidth
  虚线 strokeDasharray
  线条流动 strokeDashoffset
  透明度_元素 opacity
  透明度_填充 fillOpacity
  透明度_轮廓 strokeOpacity
  线坐标 x1
  线坐标 y1
  线坐标 x2
  线坐标 y2
  圆坐标 cx
  圆坐标 cy
  半径 radius
  半径X radiusX
  半径Y radiusY
  水平移动 left
  垂直移动 top
  ——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  */
  if (opt_an_classify === 3/*属性动画*/) {
   // console.log("动画类别:3-属性动画");

    if (opt_an_model === 1/*值动画*/) {
      // console.log("动画类别:3-属性动画;画模式:1-值动画;")

      if (is_use_parent/*使用数据状态=False-父数据*/) {

        if (opt_use_parent_set === 0/*父值数据*/) {
          // 输出-动画值
          AnVal = onGetParentData(pid, id_parent)
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = onGetPelDataVal(id_pel_data)//获取图元数据
          /** 动画值 */
          AnVal = Number(getVal)

        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
          /** 动画值 */
          AnVal = Number(getVal)
        }

      }
      if (!is_use_parent/*使用数据状态=True-子数据*/) {

        if (opt_use_sub_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = onGetPelDataVal(id_pel_data)//获取图元数据
          /** 动画值 */
          AnVal = Number(getVal)

        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
          /** 动画值 */
          AnVal = Number(getVal)
        }
      }

    }
    if (opt_an_model === 2/*值转换动画*/) {

      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = Number(onGetParentData(pid, id_parent))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))//获取_设备数据
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))//获取_设备数据
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_use_val === 1/*起始和结束*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {

              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }

    }
    if (opt_an_model === 3/*自动画*/) {

      if (opt_use_val === 1/*起始和结束*/) {

        if (opt_repeat === 0/*重复选项:0-无*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
        }
        if (opt_repeat === 1/*重复选项:1-无限循环*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
        }
        if (opt_repeat === 2/*重复选项:2-按次重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
        }
        if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" from="${from_to[0]}" to="${from_to[1]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
        }
      }
      if (opt_use_val === 2/*多值*/) {

        if (opt_repeat === 0/*重复选项:0-无*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val}  fill="freeze"></animate>`
        }
        if (opt_repeat === 1/*重复选项:1-无限循环*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="indefinite" fill="freeze"></animate>`
        }
        if (opt_repeat === 2/*重复选项:2-按次重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatCount="${repeat_count}" fill="freeze"></animate>`
        }
        if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
          AnHtml = `<animate attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" values=${mult_val} repeatDur="${repeat_dur}s" fill="freeze"></animate>`
        }
      }
    }
  }

  /* ♈★ 动画类别:4-线性移动动画
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
线性移动 lineMove
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  */
  if (opt_an_classify === 4/*线性动画*/) {
   // console.log("动画类别:4-线性动画");

    if (opt_an_model === 2/*值转换动画*/) {
      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = Number(onGetParentData(pid, id_parent))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据;*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
    }
    if (opt_an_model === 3/*自动画*/) {
      if (opt_repeat === 0/*重复选项:0-无*/) {
        AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" fill="freeze"></animateMotion>`
      }
      if (opt_repeat === 1/*重复选项:1-无限循环*/) {
        AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animateMotion>`
      }
      if (opt_repeat === 2/*重复选项:2-按次重复*/) {
        AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animateMotion>`
      }
      if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
        AnHtml = `<animateMotion from="${path_val[0].x},${path_val[0].y}" to="${path_val[1].x},${path_val[1].y}" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animateMotion>`
      }
    }
  }

  /* ♈★ 动画类别:5-路径
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
路径移动 pathMove
——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  */
  if (opt_an_classify === 5/*路径动画*/) {
   // console.log("动画类别:5-路径");

    if (opt_an_model === 2/*值转换动画*/) {
      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion dur="${dur}s" ratate='auto' fill="freeze"><mpath xlink:href="#${path_id}"/></animateMotion>`

            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="indefinite" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion dur="${dur}s" ratate='auto' fill="freeze"><mpath xlink:href="#${path_id}"/></animateMotion>`

            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="indefinite" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
         // console.log("动画模式:2-值转换动画;链接数据:1-图元数据")
          /** 获取值 */
          let getVal = Number(onGetPelDataVal(id_pel_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion dur="${dur}s" ratate='auto' fill="freeze"><mpath xlink:href="#${path_id}"/></animateMotion>`

            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="indefinite" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = Number(onGetEquipDataVal(id_equip_data))
         // console.log(getVal)
          workStore.anGetVal = getVal
          /** 动画状态线性比例尺 */
          let anStateLinear = d3.scaleLinear()
            .domain([Number(trigger[0]), Number(trigger[1])])// 设置定义域
            .range([0, 1]);  // 设置值域
          /** 判断值 */
          let judgeVal = anStateLinear(getVal)
          workStore.anJudgeVal = judgeVal
         // console.log(judgeVal)
          /** 使能动画 */
          if (judgeVal >= 1) {

            if (opt_repeat === 0/*重复选项:0-无*/) {
              AnHtml = `<animateMotion dur="${dur}s" ratate='auto' fill="freeze"><mpath xlink:href="#${path_id}"/></animateMotion>`

            }
            if (opt_repeat === 1/*重复选项:1-无限循环*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="indefinite" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 2/*重复选项:2-按次重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
            if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
              AnHtml = `<animateMotion dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
            }
          }
          if (judgeVal < 1) {
            if (opt_use_val === 1/*起始和结束*/) {
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}"  to="${from_to[0]}" begin="${begin}s" dur="${dur}s" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" to="${from_to[0]}" begin="${begin}s" dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
            if (opt_use_val === 2/*多值*/) {
              // console.log(mult_val)
              let mystr = String(mult_val);
              let arr = mystr.split(";");
              // console.log(arr); // 
              let trans_val = arr[0];
              if (opt_repeat === 0/*重复选项:0-无*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" fill="freeze"></animate>`
              }
              if (opt_repeat === 1/*重复选项:1-无限循环*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="indefinite" fill="freeze"></animate>`
              }
              if (opt_repeat === 2/*重复选项:2-按次重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatCount="${repeat_count}" fill="freeze"></animate>`
              }
              if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
                AnHtml = `<set attributeName="${AttrName}" attributeType="${AttrType}" begin="${begin}s" dur="${dur}s" to="${trans_val}" repeatDur="${repeat_dur}s" fill="freeze"></animate>`
              }
            }
          }
        }
      }
    }
    if (opt_an_model === 3/*自动画*/) {

      if (opt_repeat === 0/*重复选项:0-无*/) {
        AnHtml = `<animateMotion dur="${dur}s" ratate='auto' fill="freeze"><mpath xlink:href="#${path_id}"/></animateMotion>`
      }
      if (opt_repeat === 1/*重复选项:1-无限循环*/) {
        AnHtml = `<animateMotion dur="${dur}s" repeatCount="indefinite" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
      }
      if (opt_repeat === 2/*重复选项:2-按次重复*/) {
        AnHtml = `<animateMotion dur="${dur}s" repeatCount="${repeat_count}" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
      }
      if (opt_repeat === 3/*重复选项:3-按时间重复*/) {
        AnHtml = `<animateMotion dur="${dur}s" repeatDur="${repeat_dur}s" fill="freeze"><mpath xlink:href='#${path_id}'/></animateMotion>`
      }

    }
  }

  /* ♈★ 动画类别:6-文本内容动画
——————————————————————————————————————————————————————————————————————————————————————————————————————————————

——————————————————————————————————————————————————————————————————————————————————————————————————————————————
  */
  if (opt_an_classify === 6/*文本内容动画*/) {
    if (opt_an_model === 1/*值动画*/) {
      if (is_use_parent/*使用数据状态=False-父数据*/) {
        if (opt_use_parent_set === 0/*父值数据*/) {
          /** 获取值 */
          let getVal = onGetParentData(pid, id_parent)
          /** 动画值 */
          AnVal = getVal
        }
        if (opt_use_parent_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = onGetPelDataVal(id_pel_data)//获取图元数据
          /** 动画值 */
          AnVal = getVal
        }
        if (opt_use_parent_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
          /** 动画值 */
          AnVal = getVal
        }
      }
      if (!is_use_parent/*使用数据状态=True-子数据;*/) {
        if (opt_use_sub_set === 1/*图元数据*/) {
          /** 获取值 */
          let getVal = onGetPelDataVal(id_pel_data)//获取图元数据
          /** 动画值 */
          AnVal = getVal
        }
        if (opt_use_sub_set === 2/*设备数据*/) {
          /** 获取值 */
          let getVal = onGetEquipDataVal(id_equip_data)//获取_设备数据
          /** 动画值 */
          AnVal = getVal
        }
      }
    }

  }
  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 反馈:动画值;动画标签
  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  return [AnVal, AnHtml]
}

/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 创建 图元数据;设备数据;驱动数据 选项
/**———————————————————————————————————————————————————————————————————————————————————————————————— */

/** 创建_图元数据_选项 */
export const onCreatePelDataOpt = () => {
 // console.log("♈ 动画-创建 图元数据 选项")

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 数据 清空 转储 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  canvasStore.pelDataOpt = [];//清空-图元数据选项
  let copyData = JSON.parse(JSON.stringify(workStore.pelData));//深度拷贝

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 遍历 建立数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  copyData.forEach((item: any) => {

    let obj: any = {
      // 名称[类型]键
      label: item.pelDataDescr + ' ' + item.pelDataLabel + ' ' + item.pelDataVal,
      // id
      value: item.pelDataId,
    }
    canvasStore.pelDataOpt.push(obj)
  })

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立空值数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let noneValObj: any = {
    label: '未选择',
    value: 'none', // id
  }
  canvasStore.pelDataOpt.unshift(noneValObj)

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立头部数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let headObj: any = {
    label: '请选择 图元数据 -----------------',
    value: '', // id
    disabled: true
  }
  canvasStore.pelDataOpt.unshift(headObj)
};

/** 创建_设备数据_读_选项 */
export const onCreateReadEquipsOpt = () => {
 // console.log("♈ 动画-创建_设备数据_读_选项")

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 数据 清空 转储 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  canvasStore.readEquipDataOpt = [];//清空-选项
  let copyData = JSON.parse(JSON.stringify(workStore.equipData));//深度拷贝

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 遍历 建立数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  for (let index = 0; index < copyData.length; index++) {
    const item = copyData[index];
    if (item.equipDataRW === 0) {
      let obj: any = {
        // 名称[类型]键
        label: item.equipDataDescr + ' ' + item.equipDataLabel + ' ' + item.equipDataVal,
        // id
        value: item.equipDataId,
      }
      canvasStore.readEquipDataOpt.push(obj)
    }
  }

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立空值数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let noneValObj: any = {
    label: '未选择',
    value: 'none', // id
  }
  canvasStore.readEquipDataOpt.unshift(noneValObj)

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立头部数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let headObj: any = {
    label: '请选择 设备数据 -----------------',
    value: '', // id
    disabled: true
  }
  canvasStore.readEquipDataOpt.unshift(headObj)

};

/** 创建_设备数据_写_选项 */
export const onCreateWriteEquipsOpt = () => {
 // console.log("♈ 动画-创建_设备数据_写_选项")

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 数据 清空 转储 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  canvasStore.writeEquipDataOpt = [];//清空-选项
  let copyData = JSON.parse(JSON.stringify(workStore.equipData));//深度拷贝

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 遍历 建立数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  for (let index = 0; index < copyData.length; index++) {
    const item = copyData[index];
    if (item.equipDataRW === 1) {
      let obj: any = {
        // 名称[类型]键
        label: item.equipDataDescr + ' ' + item.equipDataLabel + ' ' + item.equipDataVal,
        // id
        value: item.equipDataId,
      }
      canvasStore.writeEquipDataOpt.push(obj)
    }
  }

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立空值数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let noneValObj: any = {
    label: '未选择',
    value: 'none', // id
  }
  canvasStore.writeEquipDataOpt.unshift(noneValObj)

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立头部数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let headObj: any = {
    label: '请选择 设备数据 -----------------',
    value: '', // id
    disabled: true
  }
  canvasStore.writeEquipDataOpt.unshift(headObj)

}

/** 迭代_创建_通道数据_选项  */
const onCreateChannelOptIteration = (dataSet: any,) => {
 // console.log("♈ 迭代_创建_通道数据_选项 ")
  // 🦢 ------| ★ 填充-设备数据 选项 
  dataSet.forEach((item: any) => {
   // console.log(item)
    if (item.active) {
      let obj: any = {
        // 名称
        label: item.label,
        // id
        value: item.key,
      }
      canvasStore.channelsOpt.push(obj)
    }

    // 🦢 ----| ★ 迭代_创建
    try {
      if (item.children.length > 0) {
       // console.log("有子数据")
        let childrenDataSet = item.children
        for (let index = 0; index < childrenDataSet.length; index++) {
          const tempSet = childrenDataSet[index].children
          onCreateChannelOptIteration(tempSet)
        }
      }
    } catch (error) {
    }
  })
};

/** 创建_通道数据_选项  */
export const onCreateChannelOpt = () => {
 // console.log("♈ 动画-创建_通道数据_选项 ")
  canvasStore.channelsOpt = [];//清空-设备数据 选项
  /** ★ 填充-设备数据 选项 */
  workStore.channels.forEach((item: any) => {
   // console.log("1---------------------------")
   // console.log(item.label)
    // 判断叶节点
    if (item.active) {
      let obj: any = {
        // 名称
        label: item.label,
        // id
        value: item.key,
      }
      canvasStore.channelsOpt.push(obj)//设备数据读选项
    }
    // 🦢 ----| ★ 迭代_创建
    try {
      if (item.children.length > 0) {
       // console.log("有子数据")
        let childrenDataSet = item.children
        childrenDataSet.forEach((element: any) => {
         // console.log(element)
          onCreateChannelOptIteration(element.children)
        })

      }
    } catch (error) {

    }
  })

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立空值数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let noneValObj: any = {
    label: '未选择',
    value: 'none', // id
  }
  canvasStore.channelsOpt.unshift(noneValObj)
  
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 添加头部数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  canvasStore.channelsOpt.unshift({
    /*名称[类型]键*/
    label: '请选择 设备数据 参数----------------------------',
    // id
    value: '',

    disabled: true
  })//设备数据读选项
};

/** 创建_父动画值_选项  */
export const onParentAnValOpt = () => {
  // console.log("♈ 创建_父动画值_选项")

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 数据转储
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  canvasStore.parentAnValOpt = [];//清空 选项
  /** 深度拷贝-图元数据集 */
  let copyPels = JSON.parse(JSON.stringify(workStore.pels));
  /** 父id */
  let parentId = String(canvasStore.selectedPel.parent);

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 遍历图元集
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  for (let index = 0; index < copyPels.length; index++) {
    const pelInfo = copyPels[index];
    /** 图元类型 */
    let PelType = pelInfo.type;
    if (PelType === 'wrap' && pelInfo.key === parentId) {

      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      // 🐸 建立数据  animations.subAn.an_val
      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      let anVals = pelInfo.an_vals;
      for (let indexB = 0; indexB < anVals.length; indexB++) {
        const anValItem = anVals[indexB];
        canvasStore.parentAnValOpt.push({
          // 描述
          label: anValItem.descr,
          // id
          value: anValItem.key,
        })
      }

      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      // 🐸 建立空值数据 
      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      let noneValObj: any = {
        label: '未选择',
        value: 'none', // id
      }
      canvasStore.parentAnValOpt.unshift(noneValObj)

      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      // 🐸 添加头部数据 
      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      canvasStore.parentAnValOpt.unshift({
        /*名称[类型]键*/
        label: '请选择 父动画值 ----------------------------',
        // id
        value: "",
        disabled: true
      })
    }
  }

};

/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 创建_路径id_选项
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
/** 迭代-创建_路径id_选项 */
export const onCreatePathIdOptIteration = (pelChildern: any) => {
 // console.log("♈ 迭代-创建_路径id_选项")

  /** ★ 填充-路径id */
  pelChildern.forEach((pel: any) => {

    if (pel.type === 'path') {
      let obj: any = {
        // 名称
        label: pel.label + ' ' + pel.key,
        // id
        value: pel.id,
        // 角点参数
        pathPoints: pel.attrs.pathPoints.pathPoints
      }
      canvasStore.pathIdOpt.push(obj)
    }
  })

  try {
    if (pelChildern.children.length > 0) {
      onCreatePathIdOptIteration(pelChildern.children)
    }
  } catch (error) {
  }

}

/** 创建_路径id_选项 */
export const onCreatePathIdOpt = () => {
 // console.log("♈ 动画-创建_路径id_选项");

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 数据 清空 转储 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  canvasStore.pathIdOpt = [];//清空-路径id选项

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 遍历 建立数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  workStore.pels.forEach((pel: any) => {
    if (pel.type === 'path') {
     // console.log(pel)
      let obj: any = {
        // 名称[类型]键
        label: pel.label + ' ' + pel.key,
        // id
        value: pel.key,
        // 角点参数
        pathPoints: pel.attrs.pathPoints.pathPoints
      }
      canvasStore.pathIdOpt.push(obj)
    }

    try {
      if (pel.children.length > 0) {
        onCreatePathIdOptIteration(pel.children)
      }
    } catch (error) {
    }
  })

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 建立空值数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let noneValObj: any = {
    label: '未选择',
    value: 'none', // id
    // 角点参数
    pathPoints: []
  }
  canvasStore.pathIdOpt.unshift(noneValObj)

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 添加头部数据 
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  let headObj: any = {
    label: '♈-------------------------------------------------请选择 路径',/*名称[类型]键*/
    value: '', // id
    disabled: true
  }
  canvasStore.pathIdOpt.unshift(headObj)

 // console.log(canvasStore.pathIdOpt)
}

/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 图元数据;设备数据; 获取
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
/** 获取_图元数据
 * @findId 查询id
 * @返回_图元数据值 pelDataVal
 */
export const onGetPelDataVal = (findId: string): string => {
  // console.log("♈ 动画-获取图元数据")
  // console.log(`findId==${findId}`)
  let res = ''
  /** 深度拷贝图元数据 */
  let copyPelData = JSON.parse(JSON.stringify(workStore.pelData))
  for (let index = 0; index < copyPelData.length; index++) {
    const item = workStore.pelData[index];
    if (findId === item.pelDataId) {
      res = String(item.pelDataVal)
    }
  }
  // console.log(res)
  return res
}

/** 获取_设备数据
 * @findId 查询id
 * @返回_设备数据值 equipDataVal
 */
export const onGetEquipDataVal = (findId: string): string => {
 // console.log("♈ 动画-获取设备数据")
 // console.log(`id_parent==${id_parent}`)
  let res = ''
  for (let index = 0; index < workStore.equipData.length; index++) {
    const item = workStore.equipData[index];
    if (findId === item.equipDataId) {
      res = String(item.equipDataVal)
    }
  }
  // console.log(res)
  return res
}

/** 获取_父动画数据
 * @pid     父键
 * @findKey 查询键
 */
export const onGetParentData = (pid: string, findKey: string): string => {
 // console.log("♈ 动画-获取_父动画数据");
 // console.log(`id_parent==${id_parent}`)
  let res = ''

  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  // 🐸 一级遍历;遍历图元数据
  /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  for (let indexA = 0; indexA < workStore.pels.length; indexA++) {
    const item = workStore.pels[indexA];
    if (item.type === 'wrap' && item.key === pid) {
      /** 动画值 */
      let anVal = item.an_vals

      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      // 🐸二级遍历;遍历动画值
      /**~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      for (let indexB = 0; indexB < anVal.length; indexB++) {
        /** 动画值项目 */
        const anValItem = anVal[indexB];
        if (String(anValItem.key) === findKey) {
         // console.log(AnValItem)
          res = String(anValItem.val);
         // console.log(res)
        }
      }
    }
  }

  return res
}

/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 更新-更新动画参数
/**———————————————————————————————————————————————————————————————————————————————————————————————— */

/** 迭代设置_设置图元动画参数
 * @参数_subSet 子数据
 * @参数_Id         图元Id
 * @参数_NewVal     新变量
 */
const onSetPelAnInfoIteration = (subSet: any, id: string, newVal: any) => {
 // console.log("♈ 动画-迭代_设置图元动画");
  for (let index = 0; index < subSet.length; index++) {
    const dataSet = subSet[index];
    if (dataSet.key === id) {
      /** 设置动画 */
      dataSet.animations = newVal
    }
    /** 子 子*/
    try {
      let Children = dataSet.children;
      if (Children.length > 0) {
        onSetPelAnInfoIteration(Children, id, newVal);
      }
    } catch (error) {
     // console.log(error);
    }
  }
}

/** 设置-图元动画参数
 * @参数_DataSet    数据
 * @参数_Id         图元Id
 * @参数_NewVal     新变量
 */
const onSetPelAnInfo = (dataSet: any, id: string, newVal: any) => {
 // console.log("♈ 动画-设置图元动画");
  /** ◆ 遍历属性 */
  if (dataSet !== undefined) {
    if (dataSet.key === id) {
      /** 设置动画 */
      dataSet.animations = newVal
    }
    /** ◆ 迭代 */
    try {
      if (dataSet.children.length > 0) {
        /** 迭代-根据键添加图元 */
       // console.log("       ...... 迭代-设置图元属性");
        onSetPelAnInfoIteration(dataSet.children, id, newVal);
      }
    } catch (error) {
     // console.log(error);
    }
  }
}

/** 动画-更新图元动画参数
 *@把选择属性填充到图元数据中
 */
export const onUpdataPelAnInfo = () => {
 // console.log("♈ 动画-更新图元动画")
  /** 动画属性 */
  let Ans = canvasStore.selectedPel.animations
  /** 图元Id */
  let id = canvasStore.selectedPel.key
 // console.log("★ --------------- 遍历 图元数据")
  workStore.pels.forEach((dataSet: any) => {
    onSetPelAnInfo(dataSet, id, Ans)
  })
}

/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 设置图元数据
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
/** 设置_图元数据
 * @findId 查询id
 * @返回_图元数据值 PelDataVal
 */
export const onSetPelData = (findId: string, newVal: any) => {
 // console.log("♈ 设置图元数据")
 // console.log(`id_parent==${id_parent}`)
  for (let index = 0; index < workStore.pelData.length; index++) {
    const item = workStore.pelData[index];
    if (findId === String(item.pelDataId)) {
     // console.log(newVal)
      item.pelDataVal = newVal;
    }
  }
}
/**———————————————————————————————————————————————————————————————————————————————————————————————— */
//                                ★ 更新-更新事件参数
/**———————————————————————————————————————————————————————————————————————————————————————————————— */

/** 迭代设置_事件参数
 * @参数_subSet 子数据
 * @参数_Id         图元Id
 * @参数_NewVal     新变量
 */
const onSetPelEventInfoIteration = (subSet: any, id: string, newVal: any) => {
 // console.log("♈ 动画-设置_事件参数")
  for (let index = 0; index < subSet.length; index++) {
    const dataSet = subSet[index];
    if (dataSet.key === id) {
      /** 设置动画 */
      dataSet.events = newVal
    }
    /** 子 子*/
    try {
      let Children = dataSet.children;
      if (Children.length > 0) {
        onSetPelEventInfoIteration(Children, id, newVal);
      }
    } catch (error) {
     // console.log(error);
    }
  }
}

/** 设置-设置_事件参数
 * @参数_DataSet    数据
 * @参数_Id         图元Id
 * @参数_NewVal     新变量
 */
const onSetPelEventInfo = (dataSet: any, id: string, newVal: any) => {
 // console.log("♈ 动画-设置_事件参数");
  /** ◆ 遍历属性 */
  if (dataSet !== undefined) {
    if (dataSet.key === id) {
      /** 设置动画 */
      dataSet.events = newVal
    }
    /** ◆ 迭代 */
    try {
      if (dataSet.children.length > 0) {
        /** 迭代-根据键添加图元 */
       // console.log("       ...... 迭代-设置图元属性");
        onSetPelEventInfoIteration(dataSet.children, id, newVal);
      }
    } catch (error) {
     // console.log(error);
    }
  }
}

/** 更新_事件参数
 *@把选择属性填充到图元数据中
 */
export const onUpdataPelEventInfo = () => {
 // console.log("♈ 动画-更新_事件参数")
  /** 动画属性 */
  let Events = canvasStore.selectedPel.events
  /** 图元Id */
  let id = canvasStore.selectedPel.key
 // console.log("★ --------------- 遍历 图元数据")
  workStore.pels.forEach((dataSet: any) => {
    onSetPelEventInfo(dataSet, id, Events)
  })
}
